<!--
 * @Author: hq
 * @Date: 2022-05-23 16:26:47
 * @LastEditors: hq
 * @LastEditTime: 2022-05-23 16:54:27
 * @Description: your project
 * @version: 1.0
-->
<template>
  <div>
    <div class="rowData">
      <div class="col1">文件限制大小</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写后台管理路径"></el-input>
      </div>
      <div class="col3">
        单位：KB，0表示不限制大小
        <div>调用方式<span>config('upload.upload_file_size')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">允许上传文件格式</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写后台管理路径"></el-input>
      </div>
      <div class="col3">
        多个格式请用英文逗号（,）隔开
        <div>调用方式<span>config('upload.upload_file_ext')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">图片上传大小限制</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写后台管理路径"></el-input>
      </div>
      <div class="col3">
        单位：KB，0表示不限制大小
        <div>调用方式<span>config('upload.upload_image_size')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">允许上传图片格式</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写后台管理路径"></el-input>
      </div>
      <div class="col3">
        多个格式请用英文逗号（,）隔开
        <div>调用方式<span>config('upload.upload_image_ext')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">缩略图尺寸</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写后台管理路径"></el-input>
      </div>
      <div class="col3">
        为空则不生成，生成 500x500 的缩略图，则填写 500x500，多个规格填写参考
        300x300;500x500;800x800
        <div>调用方式<span>config('upload.thumb_size')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">缩略图裁剪方式</div>
      <div class="col2">
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="col3">
        <div>调用方式<span>config('upload.thumb_type')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">图片水印开关</div>
      <div class="col2">
        <el-switch
          class="tablescope"
          v-model="switchValue"
          :active-color="$color - primary1"
          inactive-color=""
          active-text="启用"
          inactive-text="禁用"
        >
        </el-switch>
      </div>
      <div class="col3">
        站点关闭后将不能访问，后台可正常登录
        <div>调用方式<span>config('upload.image_watermark')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">图片水印图</div>
      <div class="col2">
        <el-upload
          class="avatar-uploader"
          action=""
          :show-file-list="false"
          :on-success="handleAvatarSuccess"
          :before-upload="beforeAvatarUpload"
        >
          <img v-if="imageUrl" :src="imageUrl" class="avatar" />
          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
        </el-upload>
      </div>
      <div class="col3">
        <div>调用方式<span>config('upload.image_watermark_pic')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">图片水印透明度</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写图片水印透明度"></el-input>
      </div>
      <div class="col3">
        可设置值为0~100，数字越小，透明度越高
        <div>调用方式<span>config('upload.image_watermark_opacity')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">图片水印图位置</div>
      <div class="col2">
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="col3">
        <div>
          调用方式<span>config('upload.image_watermark_location')</span>
        </div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">文字水印开关</div>
      <div class="col2">
        <el-switch
          class="tablescope"
          v-model="switchValue"
          :active-color="$color - primary1"
          inactive-color=""
          active-text="启用"
          inactive-text="禁用"
        >
        </el-switch>
      </div>
      <div class="col3">
        <div>调用方式<span>config('upload.text_watermark')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">文字水印内容</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写文字水印内容"></el-input>
      </div>
      <div class="col3">
        <div>调用方式<span>config('upload.text_watermark_content')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">文字水印位置</div>
      <div class="col2">
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="col3">
        <div>调用方式<span>config('upload.text_watermark_location')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">文字水印字体</div>
      <div class="col2">
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="col3">
        不上传将使用系统默认字体
        <div>调用方式<span>config('upload.text_watermark_font')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1">文字水印字体大小</div>
      <div class="col2">
        <el-input v-model="size" placeholder="请填写后台管理路径"></el-input>
      </div>
      <div class="col3">
        单位：px(像素)
        <div>调用方式<span>config('upload.text_watermark_size')</span></div>
      </div>
    </div>
    <div class="rowData">
      <div class="col1"></div>
      <div class="col2">
        <el-button type="primary">提交</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      size: "",
      options: [
        {
          value: "选项1",
          label: "黄金糕",
        },
        {
          value: "选项2",
          label: "双皮奶",
        },
        {
          value: "选项3",
          label: "蚵仔煎",
        },
        {
          value: "选项4",
          label: "龙须面",
        },
        {
          value: "选项5",
          label: "北京烤鸭",
        },
      ],
      value: "",
    };
  },
};
</script>

<style lang="scss" scoped>
@import "@/style/index.scss";
.rowData {
  display: flex;
  align-items: center;
  padding-top: 20px;
  box-sizing: border-box;
  .col1 {
    width: 10%;
    text-align: end;
    font-size: 14px;
  }
  .col2 {
    width: 20%;
    padding: 0 20px;
    box-sizing: border-box;
    /deep/.avatar-uploader .el-upload {
      border: 1px dashed #d9d9d9;
      border-radius: 6px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    .avatar-uploader .el-upload:hover {
      border-color: #409eff;
    }
    .avatar-uploader-icon {
      font-size: 28px;
      color: #8c939d;
      width: 80px;
      height: 80px;
      line-height: 80px;
      text-align: center;
    }
    .avatar {
      width: 80px;
      height: 80px;
      display: block;
    }
  }
  .col3 {
    font-size: 12px;
    color: #666666;
    span {
      color: $color-primary1;
    }
  }
}
</style>
